#pragma once
#include <string>


namespace Poco {
	class File;
	class Path;
	class Logger;
	namespace Util {
		class Application;
		class LayeredConfiguration;
	}
}

enum E_OUTDATE_STRATEGY {
	FORCE,
	TIMESTAMP,
	CONTENTS,
	MD5
};

class OutdateStrategy
{
public:
	OutdateStrategy();
	~OutdateStrategy();
	virtual bool needEncode(const Poco::File& f) = 0;
	virtual bool needDecode(const Poco::File& f) = 0;
	virtual void showInfo() = 0;
	bool needEncode(const std::string &fn);
	bool needDecode(const std::string &fn);
	

};
class OutdateForceStrategy :public OutdateStrategy {
public:
	OutdateForceStrategy();
	~OutdateForceStrategy();
	bool needEncode(const Poco::File& f);
	bool needDecode(const Poco::File& f);
	void showInfo();
};
class OutdateTimeStampStrategy :public OutdateStrategy {
public:
	OutdateTimeStampStrategy();
	~OutdateTimeStampStrategy();
	bool needEncode(const Poco::File& f);
	bool needDecode(const Poco::File& f);
	void showInfo();
};
class OutdateContentsStrategy :public OutdateStrategy {
public:
	OutdateContentsStrategy();
	~OutdateContentsStrategy();
	bool needEncode(const Poco::File& f);
	bool needDecode(const Poco::File& f);
	void showInfo();
};

class OutdateMd5Strategy :public OutdateStrategy {
public:
	OutdateMd5Strategy();
	~OutdateMd5Strategy();
	bool needEncode(const Poco::File& f);
	bool needDecode(const Poco::File& f);
	void showInfo();
};